﻿
edit(filePath, editor="") {
    global DEFAULT_EDITOR

    if(!editor)
        editor := DEFAULT_EDITOR
    
    if (!FileExist(editor)) {
        MsgBox, 编辑器 %editor% 不存在，请设置
        Run, explorer "%A_ScriptDir%"
        return
    }

    Run, "%editor%" "%filePath%"
}
